From: Colin Walters Date: Tue, 25 Oct 2016 17:16:14 +0000 (-0400) Subject: parse-datetime: Use labs() for long input value X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~44^2~35 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=cbbfb5369fbbab9b0553db16636cfe76b12b1d75;p=ostree.git parse-datetime: Use labs() for long input value Fixes a compliation warning with CLang, I didn't study it to see whether this was a major issue or not. Closes: #548 Approved by: jlebon --- diff --git a/src/ostree/parse-datetime.y b/src/ostree/parse-datetime.y index d05bb55b..f5688d30 100644 --- a/src/ostree/parse-datetime.y +++ b/src/ostree/parse-datetime.y @@ -896,7 +896,7 @@ time_zone_hhmm (parser_control *pc, textint s, long int mm) /* If the absolute number of minutes is larger than 24 hours, arrange to reject it by incrementing pc->zones_seen. Thus, we allow only values in the range UTC-24:00 to UTC+24:00. */ - if (24 * 60 < abs (n_minutes)) + if (24 * 60 < labs (n_minutes)) pc->zones_seen++; return n_minutes;